//
//  ReplaceDriveDetailCallCell.m
//  JxCarios
//
//  Created by xcq on 15/1/30.
//  Copyright (c) 2015年 xiongchuanqi. All rights reserved.
//

#import "ReplaceDriveDetailCallCell.h"
#import "Common.h"
#import "ConfigDefine.h"

@implementation ReplaceDriveDetailCallCell

- (void)awakeFromNib {
    _array = @[@"联系电话一线",@"联系电话二线",@"联系电话三线",@"联系电话四线",@"联系电话五线"];
    _view.backgroundColor = UICOLOR_MAKE_RGB(239, 238, 244);
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}
- (void)setCount:(NSInteger)count{
    _count = count;
   
    _detail.text = _array[_count];
 }

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

- (IBAction)callAction:(id)sender {
    NSString *prefix = @"tel://";
    NSString *phoneNum = [prefix stringByAppendingString:self.phone.text];
    UIWebView *callPhoneWebVw = [[UIWebView alloc] init];
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:phoneNum]];
    [callPhoneWebVw loadRequest:request];
    [self.window addSubview:callPhoneWebVw];
}
@end
